home *** CD-ROM | disk | FTP | other *** search
- #include "common.h"
-
- // The new lock state is held in a temp variable, in case new and old
- // happen to be the same pointer. Otherwise, the old->Locked = -1 would
- // trash the new value.
-
- // old is assumed to be pointed to the vars currently in use.
-
- void InitToPrefs(BusVars *new,BusVars *old) {
- const long DangerStr = 0x50FF8001;
- short newLock = new->Locked;
-
- old->Locked = Locked_stop; // lock it so we can change things
- old->Behavior = new->Behavior; // copy new values
- old->Do4 = new->Do4;
-
- *(long *)(0) = DangerStr; // init the magic values
- if ( new->Do4 == Do4_yep )
- *(long *)(4) = DangerStr;
-
- old->Locked = newLock; // free the vbl to run again
- }